package whut.pso;

/**
 * Created by Justin on 2018-04-04
 */
public class SPSOWeightHandler implements IWeightHandler, IPSOConstants {
    @Override
    public double getWeight(double t) {
        double e = Math.PI * t / (2 * MAX_ITERATION);
        return W_UPPERBOUND * (1 - Math.sin(e)) + W_LOWERBOUND * Math.sin(e);
    }
}
